import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * Created by leanne on 7/17/14.
 */
public class isosceles {
    public static void main(String args[]) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        System.out.println("Please enter number of rows in isosceles triangle");
        try {
            int input = Integer.parseInt(reader.readLine());
            drawTriangle(input);
        } catch(NumberFormatException n) {
            System.out.println("Incorrect format");
        }
    }

    private static void drawTriangle(int numOfRows) {
        // Number of spaces
        int spaces = numOfRows - 1;

        // For each row
        for(int i = 1; i <= numOfRows; i++) {
            // For each space needed
            for(int j = spaces; j > 0; j--) {
                System.out.print(" ");
            }

            // For each star needed
            for(int k = i; k > 0; k--) {
                System.out.print("*");
                System.out.print(" ");
            }

            spaces--;
            System.out.println();
        }
    }
}
